package com.xuelang.pipeline.client.pipeline.enums;

import lombok.Getter;

/**
 * @author liuyuan.ly
 * @since 2024/7/24 20:28
 */
@Getter
public enum ExpressionTypeEum {
    noPass("小于等于", "LE");

    private final String key;
    private final String value;

    ExpressionTypeEum(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public static ExpressionTypeEum fromValue(String value) {
        for (ExpressionTypeEum expressionTypeEum : ExpressionTypeEum.values()) {
            if (expressionTypeEum.value.equals(value)) {
                return expressionTypeEum;
            }
        }
        throw new IllegalArgumentException("Invalid value: " + value);
    }
}
